<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加二级区域</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link href="<%=basepath%>css/index.css" rel="stylesheet" type="text/css">
    <link href="<%=basepath%>css/platform.css" rel="stylesheet" type="text/css">
    <script src="<%=basepath%>js/jquery-1.8.3.min.js"></script>
    <script src="<%=basepath%>js/layer/layer.js"></script>
</head>
<body>
<div class="viewport">
    <div class="header">
       <div class="header-1">
           <a href="javascrpt:void(0)" id="join" class="header-2">
              <span id="account" class="account">${empty user.realName ? '' : user.realName}</span>&nbsp;&nbsp;<span id="deptName" class="deptName">${user.departmentName}</span>
           </a>
           <a href="/wape-web/api/core/centerService?serviceCode=WJ9999&targetURL=store&prefix=3g_platform_shop-rent_op&entrance=yes" class="back" id="back">返回</a>
           <span class="span-num">WWP31300</span>
       </div>
    </div>
    <div class="content m-top">
        <div class="blank-z"></div>
        <div class="sub-1">
            <div class="sub-1-1">
                <form method="post" id="myForm" name="myForm" action="/wape-web/api/core/centerService">
                <table>
                   <tr>
                       <td class="td-1">二级区域名称：</td>
                       <td><div style="border-bottom:1px solid #ccc;"><input type="text" name="storeName" id="sure-1" style="border:none;width:90%;"></div></td>
                   </tr>
                   <tr>
                       <td class="td-1">经营品类：</td>
                       <td>
                           <div style="border-bottom:1px solid #ccc;">
                               <select name="storeType" style="border:none;-moz-appearance: none;-webkit-appearance:none;appearance:none;width:90%;height:30px;">
                                   <option value="10">大棚经营区</option>
                                   <option value="20">蔬菜经营区</option>
                                   <option value="30">水果经营区</option>
                                   <option value="40">海鲜经营区</option>
                                   <option value="50">冻品经营区</option>
                                   <option value="60">干货经营区</option>
                               </select>
                               <img src="<%=basepath%>images/select.png" alt="" style="width:16px;position:relative;top:-3px;">
                           </div>
                       </td>
                   </tr>
                   <tr>
                       <td class="td-1">区域面积：</td>
                       <td><div style="border-bottom:1px solid #ccc;"><input type="text" name="totalArea" id="sure-3" style="border:none;width:90%;text-align:right;">&nbsp;m²</div></td>
                   </tr>
                   <tr>
                       <td class="td-1">商铺数量：</td>
                       <td><div style="border-bottom:1px solid #ccc;"><input type="text" name="storeRemark" id="sure-4" style="border:none;width:90%;text-align:right;">&nbsp;个</div></td>
                   </tr>
                   <tr>
                       <td class="td-1">自营车位数量：</td>
                       <td><div style="border-bottom:1px solid #ccc;"><input type="text" name="packingCount" id="sure-5" style="border:none;width:90%;text-align:right;">&nbsp;个</div></td>
                   </tr> 
                   <!-- <tr>
                       <td class="td-1">其它信息：</td>
                       <td><div style="border-bottom:1px solid #ccc;"><input type="text" name="" id="sure-6" placeholder="选填" style="border:none;width:90%;"></div></td>
                   </tr> -->
                </table>
                <input type="hidden" name="fatherId" value="${fatherId}" />
                <input type="hidden" name="fatherName" value="${fatherName}" />
                <input type="hidden" name="fatherLevelNum" value="${fatherLevelNum}" />
                <input type="hidden" name="fatherType" value="${fatherType}" />
                <input type="hidden" name="serviceCode" value="MMZS21109" />
                </form>
            </div>
            <div class="sub-1-2"><a href="javascript:;" id="sure" class="sure">确认添加</a></div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
	/*错误提示*/
	   $(function(){
	       var error = "${requestScope.returnMsg}";
	       if(error != "" && error != "成功!"){
	           layer.msg(error,{shadeClose:true,shade:0.1,time:2000});
	       }
	   });
    $(function(){
    	/*  */
    	$("#sure").click(function(){
    		layer.confirm('确认添加，您确定？',{
    			icon:3,
    			title:'确认添加'
    		},function(){
    			layer.closeAll();
    			$("#myForm").submit();
    		});
    	});
    	/*表单*/
    	$("#myForm").submit(function(){
    		var sure1 = $("#sure-1").val();
    		var sure2 = $("#sure-2").val();
    		var sure3 = $("#sure-3").val();
    		var sure4 = $("#sure-4").val();
    		var sure5 = $("#sure-5").val();
    		if(sure1 == ""){
    			layer.msg("请输入二级区域名称",{shadeClose:true,shade:0.1,time:2000});
                return false;
    		}
    		else if(sure2 == ""){
                layer.msg("请输入经营品类",{shadeClose:true,shade:0.1,time:2000});
                return false;
            }
    		else if(sure3 == ""){
                layer.msg("请输入区域面积",{shadeClose:true,shade:0.1,time:2000});
                return false;
            }
    		else if(sure4 == ""){
                layer.msg("请输入商铺数量",{shadeClose:true,shade:0.1,time:2000});
                return false;
            }
    		else if(sure5 == ""){
                layer.msg("请输入自营车位数量",{shadeClose:true,shade:0.1,time:2000});
                return false;
            } 
            else{
            	layer.load();
                setTimeout(function(){
                    layer.closeAll();
                    layer.msg("网络异常，请重新尝试！",{shadeClose:true,shade:0.1,time:2000});
                }, 30000);
            }
    	});
    });
</script>
</html>


